package com.kongfuzi.student.support.utils;

import android.content.Context;
import android.widget.Toast;

/**
 * Created by cfan_yang on 2015/12/9.
 * 单例Toast,解决重复弹出
 */
public class ToastUtil {
    private static Toast toast;

    public static void showToast(Context context, String msg) {
        if(toast == null) {
            toast = Toast.makeText(context,"",Toast.LENGTH_SHORT);
        }
        toast.setText(msg);
        toast.show();
    }
}
